package com.beiyou.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.beiyou.annotation.PageNote;
import com.beiyou.dto.GoodsDtoQuery;
import com.beiyou.entity.GoodsEntity;
import com.beiyou.entity.ImgsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author wzby
 * @Date: 2022/10/21 9:06
 */
@Mapper
public interface GoodsMapper extends BaseMapper<GoodsEntity> {


    @PageNote
    List<GoodsEntity> selectXml(GoodsDtoQuery goodsDtoQuery);

    @Update(" update scm_goods set name = #{name},img = #{img},parentId = #{parentId},seq = #{seq},lastUpdateBy = #{lastUpdateBy},lastUpdateTime = #{lastUpdateTime} where id = #{id}")
    int update(GoodsEntity goodsEntity);

    @Update("update scm_goods set status = #{status} where id = #{id}")
    int statusUpdate(Integer id, Integer status);
}
